package com.hong;

public class User {

    private String id;
    private String name;


    public User() {
        System.out.println("无参数构告函数-使用java的反射机制创建User对象");
    }

    public User(String id, String name) {
        System.out.println("有参数构造函数-使用java的反射机制创建User对象");
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
